home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Diamond Collection / The Diamond Collection (Software Vault)(Digital Impact).ISO / cdr48 / 386p_200.zip / PICTURE.INC < prev    next >
Text File  |  1994-05-24  |  2KB  |  73 lines

  1.  
  2.  
  3.  
  4. ; 1 nudget     = 4  pixel (plane aligned, one pixel for every plane)
  5. ; 1 big nudget = 16 pixel (plane aligned, four nudgets)
  6.  
  7. ; PIC format:
  8. ;            offset     size       name   description
  9. ;              0          2        WX     Width  of picture in BIG NUDGETS
  10. ;              2          2        WY     Height of picture in PIXELS
  11. ;              4       WX*WY*4     ----   pixel data
  12.  
  13.         extrn _GetPic:near
  14.  
  15. ;_GetPic  fills a PIC structure with the bitmap rectangle
  16. ;         located in the display page ESI
  17. ;         at position (EAX,EDX)
  18. ;         with width ECX and height EBX
  19.         ; in:
  20.         ; edi = pic dest
  21.         ; esi = scr source
  22.         ; eax = x in pixels
  23.         ; edx = y in pixels
  24.         ; ecx = x width in big-nudgets
  25.         ; ebx = y height in pixels
  26.         ; out:
  27.         ; edi = ptr to end of picture
  28.  
  29.         extrn _PutPic:near
  30.  
  31. ; _PutPic  blits a picture to screen
  32.         ; edi = scr dest
  33.         ; esi = pic ptr
  34.         ; eax =  x in pixels
  35.         ; edx =  y in pixels
  36.         ; bl  =  blit mode flag    1= left-rigth reversed blit
  37.  
  38. ; An Spt (encoded SPriTe)
  39. ; has a 4 byte header
  40. ; offset size  meaning
  41. ;      0    2  width in nudgets
  42. ;      2    2  height in pixels
  43. ; then "packeted" pixel data follows
  44.  
  45. ; RLE packet:   [..] == .. is optional
  46. ; RLE_HEADER, [INCR 1byte ], [DATA_HEAD 0..3 byte ],[DATA_DWORD 0..n dwords]
  47.  
  48.  
  49. ; RLE_HEADER  bit 0..1 = data_head lenght (0..3 BYTES)
  50. ;             bit    2 = dword data present
  51. ;             bit    3 = new line after this blit
  52. ;             bit 4..7 = dword counter n  (0..15 DWORDS)
  53.  
  54.         extrn _PutSpt:near
  55.         
  56. ;_PutSpt blits a TRLE encoded SPT data struct
  57.         ; edi = scr dest
  58.         ; esi = encoded sprite pic ptr
  59.         ; eax =  x in pixels
  60.         ; edx =  y in pixels
  61.         ; bl  =  drawing flags (1 = reverse left-right)
  62.         
  63.         extrn _Pic2Spt:near
  64. ;_Pic2Spt  translates from PIC bitmap format to SPT bitmap format        
  65.         ; 
  66.         ; ESI = pointer to PIC data max. 63 pixels wide
  67.         ; EDI = pointer to buffer for SPT data
  68.         ; returns:
  69.         ;  ESI = end of PIC data
  70.         ;  EDI = pointer to end of SPT bitmap data
  71.         ;        If PIC data is too big, EDI is equal to its initial value
  72.  
  73.